<template>
  <h1>{{ msg }}</h1>
  <button type="button" @click="increment">count is: {{ count }}</button>
  <a-button type="primary" @click="increment">count is: {{ count }}</a-button>
  <a-radio checked>Radio</a-radio>
  <a-checkbox checked>Checkbox</a-checkbox> 

</template>

<script lang="ts">
  import { defineComponent, computed } from "vue";
  // 注意此处，引入的useStore为自定义的，而不是vuex默认导出的；为了引入方便，此处需要配置别名
  // import { useStore } from 'vuex'
  import { useStore } from "store/index";

  export default defineComponent({
    name: 'HelloWorld',
    setup: () => {
      const store = useStore()
      return {
        count: computed(() => store.state.app.count), // 修改
      }
    }
  })

</script>

<style scoped></style>
